package com.hongxun.modules.api.service.impl;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.hongxun.modules.api.dao.BPointConfigDao;
import com.hongxun.modules.api.entity.BPointConfigEntity;
import com.hongxun.modules.api.service.BPointConfigService;



@Service("bPointConfigService")
public class BPointConfigServiceImpl implements BPointConfigService {
	@Autowired
	private BPointConfigDao bPointConfigDao;
	
	@Override
	public BPointConfigEntity queryObject(String guid){
		return bPointConfigDao.queryObject(guid);
	}
	
	@Override
	public List<BPointConfigEntity> queryList(Map<String, Object> map){
		return bPointConfigDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return bPointConfigDao.queryTotal(map);
	}
	
	@Override
	public void save(BPointConfigEntity bPointConfig){
        if(bPointConfig.getGuid()==null||bPointConfig.getGuid().equals("")) {

		    bPointConfig.setGuid(UUID.randomUUID().toString());
        }
		bPointConfigDao.save(bPointConfig);
	}
	
	@Override
	public void update(BPointConfigEntity bPointConfig){
		bPointConfigDao.update(bPointConfig);
	}
	
	@Override
	public void delete(String guid){
		bPointConfigDao.delete(guid);
	}
	
	@Override
	public void deleteBatch(String[] guids){
		bPointConfigDao.deleteBatch(guids);
	}
	
}
